
function formatTime(date) {
	var time = date == null ? "" : Date.parse(date.replace(/-/g, '/'))
	console.log(time)
	time = time + 7200000
	var date = new Date(time)
	console.log(date)
	var year = date.getFullYear();
	var month = date.getMonth() + 1;
	if (month < 10) {
		month = '0' + month;
	}
	var day = date.getDate();
	if (day < 10) {
		day = '0' + day;
	}
	var hour = date.getHours();
	if (hour < 10) {
		hour = '0' + hour;
	}
	var minute = date.getMinutes();
	if (minute < 10) {
		minute = '0' + minute;
	}
	var second = date.getSeconds();
	if (second < 10) {
		second = '0' + second;
	}
	return [year, month, day + ' ' + hour + ':' + minute + ':' + second].map(formatNumber).join('/');
}

function formatNumber(n) {
	n = n.toString()
	return n[1] ? n : '0' + n
}
module.exports = {
	formatTime: formatTime
}